Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation URL have to be on the same host ? as the repository. #1188

Closed
wants to merge 2 commits into from

Conversation

marcus-oscarsson
Copy link
Member

It seems like the documentation URL and the project homepage or repository have to be on the same host otherwise PyPI gives us 404 back, with the very informative error:

 HTTP Error 400: '' is not a valid url. See https://packaging.python.org/specifications/core-metadata for more information. | b"<html>\n <head>\n  <title>400 '' is not a valid url. See https://packaging.python.org/specifications/core-metadata for more information.\n \n <body>\n  <h1>400 '' is not a valid url. See https://packaging.python.org/specifications/core-metadata for more information.\n  The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>\n&#x27;&#x27; is not a valid url. See https://packaging.python.org/specifications/core-metadata for more information.\n\n\n \n"
Error: Process completed with exit code 1.

I find this a bit odd ?

@marcus-oscarsson
Copy link
Member Author

Good news is that the tagging now seems to work

@fabcor-maxiv
Copy link
Contributor

I find this a bit odd ?

Very odd... Where did this error appear? Do you have a link?

@marcus-oscarsson
Copy link
Member Author

marcus-oscarsson commented Mar 19, 2024

Well, I don't have a link. It was mentioned in some discussion that these URLs needed to be on the same host, so I thought Id give it a try and publish the package manually (with the change proposed in this PR) and that worked.

I tried to look at

https://packaging.python.org/specifications/core-metadata

but I did not really find anything there. But this documentation URL validation have changed in Poetry lately. However I found it quite unreasonable that the documentation can't be hosted somewhere else.

@fabcor-maxiv
Copy link
Contributor

fabcor-maxiv commented Mar 19, 2024

I am very confused... : D

Where did you see the error message? When uploading to PyPI? Uploading to PyPI with twine or Poetry? Did the error come from PyPI server?

This just appeared 20 minutes ago: pypa/twine#1073

@fabcor-maxiv
Copy link
Contributor

That is likely our issue form PyPI's ticket tracker directly: pypi/warehouse#15628

@marcus-oscarsson
Copy link
Member Author

The error seems to come from PyPI, see the action log below

https://github.com/mxcube/mxcubeweb/actions/runs/8344901441/job/22838474034

The upload was done by poetry publish, at this stage I'm not sure if its something that poetry is doing to the URL (I guess not) or if its PyPI

@marcus-oscarsson
Copy link
Member Author

I think they messed up something on PyPI, looking at the error message:

he server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>\n&#x27;&#x27; is not a valid url.

@marcus-oscarsson marcus-oscarsson changed the title Documentation URL have to on the same host ? as the repository. Documentation URL have to be on the same host ? as the repository. Mar 19, 2024
@marcus-oscarsson
Copy link
Member Author

Seems to work now, closing this issue :)

@fabcor-maxiv
Copy link
Contributor

Yes, the issue was this: pypi/warehouse#15628 (linked above as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants